<%@ include file="public/include.jsp" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
  <link type="text/css" rel="stylesheet" href="styles/pub/default.css">
  <link type="text/css" rel="stylesheet" href="scripts/validator3/validator.css"> 
  <script type="text/javascript" language="JavaScript" src="scripts/pub/jquery.js"></script>
  <script type="text/javascript" language="JavaScript" src="scripts/pub/validator3/validator.js"></script>
  <script type="text/javascript" language="JavaScript" src="scripts/pub/common.js"></script>
</head>
<body>
	<div class="main" style="width:50%;">
	<form id="MainForm" name="MainForm" action="CIQUserEdit.do" method="post" >
		<table style="width:100%;">
			<caption>
				CIQ用户
			</caption>
			<tr><td>
				<table  class="bean">
					<tr class="size">
					  <td width="16%"></td>
					  <td ><span class="errorinfo"><c:if test="${map.user.errorInfo!=null}">${map.user.errorInfo}</c:if><span></td>
					  <td width="24%" align="right">带<span  class="warning" >*</span>项必填</td>
					</tr>
					<tr>
					  <td class="formLabel"><span class="warning">*</span>登录名</td>
					  <td><input type="text" name="username" value="${map.user.username}"
					  	<c:if test="${map.user.id!=null}" >readOnly  class="readonly textst"</c:if>
					  	<c:if test="${map.user.id==null}" >class="textst"</c:if>
					   DataType="Require" Message="用户名必填"></td>
					  <td></td>
					</tr>
					<tr>
					  <td class="formLabel"><span class="warning">*</span>所属部门</td>
					  <td><input type="text"  class="textst" name="department" value="${map.user.department}" DataType="Require" Message="所属部门必填"></td>
					  <td></td>
					</tr>
					<tr>
					  <td class="formLabel">电子邮箱</td>
					  <td><input type="text"  class="textst" name="email" value="${map.user.email}"></td>
					  <td></td>
					</tr>			
					<tr>
					  <td class="formLabel">联系电话</td>
					  <td><input type="text"  class="textst" name="telephone" value="${map.user.telephone}"></td>
					  <td></td>
					</tr>			
					<tr>
					  <td class="formLabel">类别</td>
					  <td><mytag:c2s type="ciquserType" key="${map.user.userType}"/></td>
					  <td></td>
					</tr>
					<tr>
					  <td class="formLabel">监管人资格</td>
					  <td><input type="checkbox" name="inspector" value="1" class="noborder" <c:if test="${map.user.inspector==1}">checked</c:if>></td>
					  <td></td>
					</tr>
					<tr>
					  <td class="formLabel">注册日期</td>
					  <td><fmt:formatDate value="${map.user.regDate}"  pattern="yyyy-MM-dd" /></td>
					  <td></td>
					</tr>
					<c:if test="${map.user.id==null}" >
						<tr>
						  <td colspan="3" align="center">新注册用户密码统一为：1234</td>
						</tr>
					</c:if>
				</table>
			</td></tr>
			
			<tr class="button">
			  <td align="center">
			  	<div>
			  		<input type="hidden" value="${map.user.id}" name="id">
			  		<input type="hidden" value="${map.user.version}" name="version">
			  		<input type="hidden" value="${map.user.userType}" name="userType">
				    <input type="submit" value=" 提交 " id="submitButton" >
				    <input type="button" value=" 返回 " onClick="window.history.back();">
			  	</div>
			   </td>
			</tr>
		</table>
	</form>
	</div>
<script type="text/javascript">
 	$(document).ready(function(){
 		Validator.Setup({
			Name : "MainForm",
			ClickElement : "submitButton",
			DataSourceType : Validator.Enumerate.DataSourceType.Attribute,
			ValidateType : Validator.Enumerate.ValidateType.Click,
			AlertType : Validator.Enumerate.AlertType.SummarySingle
		});
 	});
 </script>
</body>
</html>
